﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MementoClient;
using MementoClient.Interfaces;
using MementoClient.ViewModels;
using Moq;

namespace MementoWeb.Tests
{
    public class TestHelpers
    {
        public static Mock<IDataRepository> GetClientDataRepositoryMock(ClientDataContainer clientDataContainer)
        {
            var dataRepositoryMock = new Mock<IDataRepository>();
            dataRepositoryMock.Setup(
                c =>
                c.GetClientData(It.IsAny<DateTime>(), It.IsAny<DateTime>(), "", It.IsAny<Action<ClientDataContainer>>())).
                Callback(
                    (DateTime from, DateTime to, string userName, Action<ClientDataContainer> callback) => callback(clientDataContainer));
            return dataRepositoryMock;
        }
    }
}
